home *** CD-ROM | disk | FTP | other *** search
/ Aminet 52 / Aminet 52 (2002)(GTI - Schatztruhe)[!][Dec 2002].iso / Aminet / comm / irc / epic4-mos.lha / share / epic / script / newaway < prev    next >
Text File  |  2002-09-18  |  862b  |  39 lines

  1. # newaway.m
  2. # v1.2 by Joseph Carter <knghtbrd@debian.org>
  3. # v1.0-1.1 by Matthew Green
  4. #
  5. # Public domain, as was the original
  6. #
  7. # Changes:
  8. #  28 Jun 1999, v1.2 - rewrote the whole thing for epic4  =>
  9. #   5 Jul 1999, v1.3 - replaced some @ var ='s with ^assign
  10. #                    - moved the whois check out of _na.show
  11. #                    - we now display away differently if in whois
  12.  
  13. package newaway
  14.  
  15. alias _na.show {
  16.   @ :nick = encode($tolower($0))
  17.   @ :away = encode($tolower($1-))
  18.  
  19.   unless (_na.nick[$nick] == away) {
  20.     @ _na.nick[$nick] = away
  21.     return 1
  22.   }
  23.   return 0
  24. }
  25.  
  26. on #^311 311 "*" ^assign _na.whois.$lastserver() 1
  27. on #^318 311 "*" ^assign -_na.whois.$lastserver()
  28.  
  29. on ^301 "*" {
  30.   if (_na.whois[$lastserver()]) {
  31.     xecho -b away     : $1-
  32.   } elsif (_na.show($*)) {
  33.     xecho -b $0 is away: $1-
  34.   }
  35. }
  36.  
  37. on ^unload "newaway *" purge _na
  38.  
  39.